python dictionary get keys with condition on value

104

python dictionary get keys with condition on value -

# credit to Stack Overflow user in source link

[key for key, value in mydict.items() if some_condition_on_value]

Comments

Submit
0 Comments